﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace Core.Xml.Ogc.Ows
{
    class HTTP : IXmlIsland
    {
        public List<RequestMethodType> Gets { get; set; }
        public List<RequestMethodType> Posts { get; set; }

        public XElement CreateXElement()
        {
            XElement http = new XElement(Namespaces.OWS + "HTTP");

            for (int i = 0; i < Gets.Count; i++)
                http.Add(Gets[i].CreateXElement(Namespaces.OWS + "Get"));

            for (int i = 0; i < Posts.Count; i++)
                http.Add(Posts[i].CreateXElement(Namespaces.OWS + "Post"));

            return http;
        }
    }
}
